package org.destiny.config1;

import org.destiny.servlet.TestServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;

/**
 * 使用Bean注册Servlet,如果servlet多的话，就比较麻烦
 * 
 * @author Destiny
 *
 */
// @Configuration
public class ServletConfiguration {

    @Bean
    public ServletRegistrationBean servletRegistrationBean() {
        return new ServletRegistrationBean(new TestServlet(), "/test");
    }
}
